package com.diandi.signature.enums.platfrom;

/**
 * 业务端异步通知状态
 * Created by Administrator on 2017/7/6.
 */
public enum NotifyStatus {
    待处理(0,"待处理"),
    处理成功(1,"处理成功"),
    正在处理中(2,"正在处理中"),
    处理失败(3,"处理失败"),
    ;
    private int status;
    private String desc;

    NotifyStatus(int status, String desc) {
        this.status = status;
        this.desc = desc;
    }

    public int getStatus() {
        return status;
    }

    public void setStatus(int status) {
        this.status = status;
    }

    public String getDesc() {
        return desc;
    }

    public void setDesc(String desc) {
        this.desc = desc;
    }

    public static NotifyStatus getEmun(int status){
        for (NotifyStatus notifyStatus : NotifyStatus.values()) {
            if(notifyStatus.getStatus() == status){
                return notifyStatus;
            }
        }
        return null;
    }
}
